import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AppCommonModule } from '@app/shared/common/app-common.module';
import { UtilsModule } from '@shared/utils/utils.module';
import { CountoModule } from 'angular2-counto';
import { ModalModule, TabsModule, TooltipModule, BsDropdownModule, PopoverModule } from 'ngx-bootstrap';
import { NgxChartsModule } from '@swimlane/ngx-charts';

import {
    BsDatepickerModule,
    BsDatepickerConfig,
    BsDaterangepickerConfig,
    BsLocaleService
} from 'ngx-bootstrap/datepicker';
import { NgxBootstrapDatePickerConfigService } from 'assets/ngx-bootstrap/ngx-bootstrap-datepicker-config.service';
import { TableModule } from 'primeng/table';
import {
    CalendarModule,
    TreeModule,
    DragDropModule,
    ContextMenuModule,
    PaginatorModule,
    InputMaskModule,
    EditorModule,
    AutoCompleteModule,
    FileUploadModule,
    MultiSelectModule
} from 'primeng/primeng';
import { ImageCropperModule } from 'ngx-image-cropper';
import { TextMaskModule } from 'angular2-text-mask';
import { CutleriesRoutingModule } from './cutleries-routing.module';
import { CutleryComponent } from './cutlery/cutlery.component';
import { CreateOrEditCutleryModalComponent } from './cutlery/create-or-edit-cutlery-modal.component';

//import { DeviceRoutingModule } from './device-routing.module';

NgxBootstrapDatePickerConfigService.registerNgxBootstrapDatePickerLocales();

@NgModule({
    imports: [
        FormsModule,
        CommonModule,
        FileUploadModule,
        ModalModule.forRoot(),
        TabsModule.forRoot(),
        TooltipModule.forRoot(),
        PopoverModule.forRoot(),
        BsDropdownModule.forRoot(),
        BsDatepickerModule.forRoot(),
        CutleriesRoutingModule,
        UtilsModule,
        AppCommonModule,
        TableModule,
        TreeModule,
        MultiSelectModule,
        DragDropModule,
        ContextMenuModule,
        PaginatorModule,
        CalendarModule,
        //PrimeNgFileUploadModule,
        AutoCompleteModule,
        EditorModule,
        InputMaskModule,
        NgxChartsModule,
        CountoModule,
        TextMaskModule,
        ImageCropperModule
    ],
    declarations: [CutleryComponent, CreateOrEditCutleryModalComponent],

    providers: [
        {
            provide: BsDatepickerConfig,
            useFactory: NgxBootstrapDatePickerConfigService.getDatepickerConfig
        },
        {
            provide: BsDaterangepickerConfig,
            useFactory: NgxBootstrapDatePickerConfigService.getDaterangepickerConfig
        },
        {
            provide: BsLocaleService,
            useFactory: NgxBootstrapDatePickerConfigService.getDatepickerLocale
        }
    ]
})
export class CutleriesModule {}
